\(\int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx\) [1261]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (warning: unable to verify)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 590 \[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=-\frac {a b x}{c e}-\frac {b^2 x \arctan (c x)}{c e}+\frac {(a+b \arctan (c x))^2}{2 c^2 e}+\frac {x^2 (a+b \arctan (c x))^2}{2 e}+\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {b^2 \log \left (1+c^2 x^2\right )}{2 c^2 e}-\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2} \]

[Out]

-a*b*x/c/e-b^2*x*arctan(c*x)/c/e+1/2*(a+b*arctan(c*x))^2/c^2/e+1/2*x^2*(a+b*arctan(c*x))^2/e+d*(a+b*arctan(c*x
))^2*ln(2/(1-I*c*x))/e^2+1/2*b^2*ln(c^2*x^2+1)/c^2/e-1/2*d*(a+b*arctan(c*x))^2*ln(2*c*((-d)^(1/2)-x*e^(1/2))/(
1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/e^2-1/2*d*(a+b*arctan(c*x))^2*ln(2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-
d)^(1/2)+I*e^(1/2)))/e^2-I*b*d*(a+b*arctan(c*x))*polylog(2,1-2/(1-I*c*x))/e^2+1/2*I*b*d*(a+b*arctan(c*x))*poly
log(2,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/e^2+1/2*I*b*d*(a+b*arctan(c*x))*polylog
(2,1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/e^2+1/2*b^2*d*polylog(3,1-2/(1-I*c*x))/e^2
-1/4*b^2*d*polylog(3,1-2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/e^2-1/4*b^2*d*polylog(3,
1-2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/e^2

Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 590, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {5036, 4946, 4930, 266, 5004, 5100, 4968} \[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\frac {(a+b \arctan (c x))^2}{2 c^2 e}-\frac {i b d \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))}{e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {d \log \left (\frac {2}{1-i c x}\right ) (a+b \arctan (c x))^2}{e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 e^2}+\frac {x^2 (a+b \arctan (c x))^2}{2 e}-\frac {a b x}{c e}-\frac {b^2 x \arctan (c x)}{c e}+\frac {b^2 \log \left (c^2 x^2+1\right )}{2 c^2 e}+\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2} \]

[In]

Int[(x^3*(a + b*ArcTan[c*x])^2)/(d + e*x^2),x]

[Out]

-((a*b*x)/(c*e)) - (b^2*x*ArcTan[c*x])/(c*e) + (a + b*ArcTan[c*x])^2/(2*c^2*e) + (x^2*(a + b*ArcTan[c*x])^2)/(
2*e) + (d*(a + b*ArcTan[c*x])^2*Log[2/(1 - I*c*x)])/e^2 - (d*(a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] - Sqrt[e
]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(2*e^2) - (d*(a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] + Sqrt[e]
*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(2*e^2) + (b^2*Log[1 + c^2*x^2])/(2*c^2*e) - (I*b*d*(a + b*ArcTa
n[c*x])*PolyLog[2, 1 - 2/(1 - I*c*x)])/e^2 + ((I/2)*b*d*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] - Sq
rt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/e^2 + ((I/2)*b*d*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(S
qrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/e^2 + (b^2*d*PolyLog[3, 1 - 2/(1 - I*c*x)])/(2*
e^2) - (b^2*d*PolyLog[3, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(4*e^2) - (
b^2*d*PolyLog[3, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(4*e^2)

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 4930

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x^n])^p, x] - Dist[b*c
*n*p, Int[x^n*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p, 0
] && (EqQ[n, 1] || EqQ[p, 1])

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rule 4968

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^2/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTan[c*x])^2)*(Log[
2/(1 - I*c*x)]/e), x] + (Simp[(a + b*ArcTan[c*x])^2*(Log[2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/e), x] + S
imp[I*b*(a + b*ArcTan[c*x])*(PolyLog[2, 1 - 2/(1 - I*c*x)]/e), x] - Simp[I*b*(a + b*ArcTan[c*x])*(PolyLog[2, 1
 - 2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/e), x] - Simp[b^2*(PolyLog[3, 1 - 2/(1 - I*c*x)]/(2*e)), x] + Si
mp[b^2*(PolyLog[3, 1 - 2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/(2*e)), x]) /; FreeQ[{a, b, c, d, e}, x] &&
NeQ[c^2*d^2 + e^2, 0]

Rule 5004

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rule 5036

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[f^2/
e, Int[(f*x)^(m - 2)*(a + b*ArcTan[c*x])^p, x], x] - Dist[d*(f^2/e), Int[(f*x)^(m - 2)*((a + b*ArcTan[c*x])^p/
(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && GtQ[m, 1]

Rule 5100

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With
[{u = ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x^2)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b,
 c, d, e, f, m}, x] && IntegerQ[q] && IGtQ[p, 0] && ((EqQ[p, 1] && GtQ[q, 0]) || IntegerQ[m])

Rubi steps \begin{align*} \text {integral}& = \frac {\int x (a+b \arctan (c x))^2 \, dx}{e}-\frac {d \int \frac {x (a+b \arctan (c x))^2}{d+e x^2} \, dx}{e} \\ & = \frac {x^2 (a+b \arctan (c x))^2}{2 e}-\frac {(b c) \int \frac {x^2 (a+b \arctan (c x))}{1+c^2 x^2} \, dx}{e}-\frac {d \int \left (-\frac {(a+b \arctan (c x))^2}{2 \sqrt {e} \left (\sqrt {-d}-\sqrt {e} x\right )}+\frac {(a+b \arctan (c x))^2}{2 \sqrt {e} \left (\sqrt {-d}+\sqrt {e} x\right )}\right ) \, dx}{e} \\ & = \frac {x^2 (a+b \arctan (c x))^2}{2 e}+\frac {d \int \frac {(a+b \arctan (c x))^2}{\sqrt {-d}-\sqrt {e} x} \, dx}{2 e^{3/2}}-\frac {d \int \frac {(a+b \arctan (c x))^2}{\sqrt {-d}+\sqrt {e} x} \, dx}{2 e^{3/2}}-\frac {b \int (a+b \arctan (c x)) \, dx}{c e}+\frac {b \int \frac {a+b \arctan (c x)}{1+c^2 x^2} \, dx}{c e} \\ & = -\frac {a b x}{c e}+\frac {(a+b \arctan (c x))^2}{2 c^2 e}+\frac {x^2 (a+b \arctan (c x))^2}{2 e}+\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}-\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2}-\frac {b^2 \int \arctan (c x) \, dx}{c e} \\ & = -\frac {a b x}{c e}-\frac {b^2 x \arctan (c x)}{c e}+\frac {(a+b \arctan (c x))^2}{2 c^2 e}+\frac {x^2 (a+b \arctan (c x))^2}{2 e}+\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}-\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2}+\frac {b^2 \int \frac {x}{1+c^2 x^2} \, dx}{e} \\ & = -\frac {a b x}{c e}-\frac {b^2 x \arctan (c x)}{c e}+\frac {(a+b \arctan (c x))^2}{2 c^2 e}+\frac {x^2 (a+b \arctan (c x))^2}{2 e}+\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}-\frac {d (a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {b^2 \log \left (1+c^2 x^2\right )}{2 c^2 e}-\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^2}+\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2}-\frac {b^2 d \operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^2} \\ \end{align*}

Mathematica [B] (warning: unable to verify)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1520\) vs. \(2(590)=1180\).

Time = 13.44 (sec) , antiderivative size = 1520, normalized size of antiderivative = 2.58 \[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\frac {-4 a b c e x+2 a^2 c^2 e x^2+4 a b e \arctan (c x)-4 b^2 c e x \arctan (c x)+4 a b c^2 e x^2 \arctan (c x)+2 b^2 e \arctan (c x)^2+2 b^2 c^2 e x^2 \arctan (c x)^2-8 i a b c^2 d \arcsin \left (\sqrt {\frac {c^2 d}{c^2 d-e}}\right ) \arctan \left (\frac {c e x}{\sqrt {c^2 d e}}\right )+8 a b c^2 d \arctan (c x) \log \left (1+e^{2 i \arctan (c x)}\right )+4 b^2 c^2 d \arctan (c x)^2 \log \left (1+e^{2 i \arctan (c x)}\right )+4 a b c^2 d \arcsin \left (\sqrt {\frac {c^2 d}{c^2 d-e}}\right ) \log \left (1+\frac {\left (c^2 d+e+2 \sqrt {c^2 d e}\right ) e^{2 i \arctan (c x)}}{c^2 d-e}\right )-4 a b c^2 d \arctan (c x) \log \left (1+\frac {\left (c^2 d+e+2 \sqrt {c^2 d e}\right ) e^{2 i \arctan (c x)}}{c^2 d-e}\right )+4 b^2 c^2 d \arcsin \left (\sqrt {\frac {c^2 d}{c^2 d-e}}\right ) \arctan (c x) \log \left (1+\frac {\left (c^2 d+e+2 \sqrt {c^2 d e}\right ) e^{2 i \arctan (c x)}}{c^2 d-e}\right )-4 b^2 c^2 d \arctan (c x)^2 \log \left (1+\frac {\left (c^2 d+e+2 \sqrt {c^2 d e}\right ) e^{2 i \arctan (c x)}}{c^2 d-e}\right )-4 a b c^2 d \arcsin \left (\sqrt {\frac {c^2 d}{c^2 d-e}}\right ) \log \left (\frac {-2 \sqrt {c^2 d e} e^{2 i \arctan (c x)}+e \left (-1+e^{2 i \arctan (c x)}\right )+c^2 d \left (1+e^{2 i \arctan (c x)}\right )}{c^2 d-e}\right )-4 a b c^2 d \arctan (c x) \log \left (\frac {-2 \sqrt {c^2 d e} e^{2 i \arctan (c x)}+e \left (-1+e^{2 i \arctan (c x)}\right )+c^2 d \left (1+e^{2 i \arctan (c x)}\right )}{c^2 d-e}\right )-4 b^2 c^2 d \arcsin \left (\sqrt {\frac {c^2 d}{c^2 d-e}}\right ) \arctan (c x) \log \left (\frac {-2 \sqrt {c^2 d e} e^{2 i \arctan (c x)}+e \left (-1+e^{2 i \arctan (c x)}\right )+c^2 d \left (1+e^{2 i \arctan (c x)}\right )}{c^2 d-e}\right )-4 b^2 c^2 d \arctan (c x)^2 \log \left (\frac {-2 \sqrt {c^2 d e} e^{2 i \arctan (c x)}+e \left (-1+e^{2 i \arctan (c x)}\right )+c^2 d \left (1+e^{2 i \arctan (c x)}\right )}{c^2 d-e}\right )+4 b^2 c^2 d \arcsin \left (\sqrt {\frac {c^2 d}{c^2 d-e}}\right ) \arctan (c x) \log \left (\frac {2 i c^2 d-2 i \sqrt {c^2 d e}+2 c \left (-e+\sqrt {c^2 d e}\right ) x}{\left (c^2 d-e\right ) (i+c x)}\right )+2 b^2 c^2 d \arctan (c x)^2 \log \left (\frac {2 i c^2 d-2 i \sqrt {c^2 d e}+2 c \left (-e+\sqrt {c^2 d e}\right ) x}{\left (c^2 d-e\right ) (i+c x)}\right )+2 b^2 e \log \left (1+c^2 x^2\right )-2 a^2 c^2 d \log \left (d+e x^2\right )-4 b^2 c^2 d \arcsin \left (\sqrt {\frac {c^2 d}{c^2 d-e}}\right ) \arctan (c x) \log \left (1+\frac {\left (c^2 d+e+2 \sqrt {c^2 d e}\right ) (\cos (2 \arctan (c x))+i \sin (2 \arctan (c x)))}{c^2 d-e}\right )+2 b^2 c^2 d \arctan (c x)^2 \log \left (1+\frac {\left (c^2 d+e+2 \sqrt {c^2 d e}\right ) (\cos (2 \arctan (c x))+i \sin (2 \arctan (c x)))}{c^2 d-e}\right )-4 i b c^2 d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-e^{2 i \arctan (c x)}\right )+2 i b c^2 d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,\frac {\left (-c^2 d-e+2 \sqrt {c^2 d e}\right ) e^{2 i \arctan (c x)}}{c^2 d-e}\right )+2 i a b c^2 d \operatorname {PolyLog}\left (2,-\frac {\left (c^2 d+e+2 \sqrt {c^2 d e}\right ) e^{2 i \arctan (c x)}}{c^2 d-e}\right )+2 i b^2 c^2 d \arctan (c x) \operatorname {PolyLog}\left (2,-\frac {\left (c^2 d+e+2 \sqrt {c^2 d e}\right ) e^{2 i \arctan (c x)}}{c^2 d-e}\right )+2 b^2 c^2 d \operatorname {PolyLog}\left (3,-e^{2 i \arctan (c x)}\right )-b^2 c^2 d \operatorname {PolyLog}\left (3,\frac {\left (-c^2 d-e+2 \sqrt {c^2 d e}\right ) e^{2 i \arctan (c x)}}{c^2 d-e}\right )-b^2 c^2 d \operatorname {PolyLog}\left (3,-\frac {\left (c^2 d+e+2 \sqrt {c^2 d e}\right ) e^{2 i \arctan (c x)}}{c^2 d-e}\right )}{4 c^2 e^2} \]

[In]

Integrate[(x^3*(a + b*ArcTan[c*x])^2)/(d + e*x^2),x]

[Out]

(-4*a*b*c*e*x + 2*a^2*c^2*e*x^2 + 4*a*b*e*ArcTan[c*x] - 4*b^2*c*e*x*ArcTan[c*x] + 4*a*b*c^2*e*x^2*ArcTan[c*x]
+ 2*b^2*e*ArcTan[c*x]^2 + 2*b^2*c^2*e*x^2*ArcTan[c*x]^2 - (8*I)*a*b*c^2*d*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*Ar
cTan[(c*e*x)/Sqrt[c^2*d*e]] + 8*a*b*c^2*d*ArcTan[c*x]*Log[1 + E^((2*I)*ArcTan[c*x])] + 4*b^2*c^2*d*ArcTan[c*x]
^2*Log[1 + E^((2*I)*ArcTan[c*x])] + 4*a*b*c^2*d*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*Log[1 + ((c^2*d + e + 2*Sqrt
[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] - 4*a*b*c^2*d*ArcTan[c*x]*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e]
)*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] + 4*b^2*c^2*d*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*ArcTan[c*x]*Log[1 + ((c^
2*d + e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] - 4*b^2*c^2*d*ArcTan[c*x]^2*Log[1 + ((c^2*d + e
 + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] - 4*a*b*c^2*d*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*Log[(-
2*Sqrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x])) + c^2*d*(1 + E^((2*I)*ArcTan[c*x])))/(c
^2*d - e)] - 4*a*b*c^2*d*ArcTan[c*x]*Log[(-2*Sqrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x
])) + c^2*d*(1 + E^((2*I)*ArcTan[c*x])))/(c^2*d - e)] - 4*b^2*c^2*d*ArcSin[Sqrt[(c^2*d)/(c^2*d - e)]]*ArcTan[c
*x]*Log[(-2*Sqrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) + e*(-1 + E^((2*I)*ArcTan[c*x])) + c^2*d*(1 + E^((2*I)*ArcTan[
c*x])))/(c^2*d - e)] - 4*b^2*c^2*d*ArcTan[c*x]^2*Log[(-2*Sqrt[c^2*d*e]*E^((2*I)*ArcTan[c*x]) + e*(-1 + E^((2*I
)*ArcTan[c*x])) + c^2*d*(1 + E^((2*I)*ArcTan[c*x])))/(c^2*d - e)] + 4*b^2*c^2*d*ArcSin[Sqrt[(c^2*d)/(c^2*d - e
)]]*ArcTan[c*x]*Log[((2*I)*c^2*d - (2*I)*Sqrt[c^2*d*e] + 2*c*(-e + Sqrt[c^2*d*e])*x)/((c^2*d - e)*(I + c*x))]
+ 2*b^2*c^2*d*ArcTan[c*x]^2*Log[((2*I)*c^2*d - (2*I)*Sqrt[c^2*d*e] + 2*c*(-e + Sqrt[c^2*d*e])*x)/((c^2*d - e)*
(I + c*x))] + 2*b^2*e*Log[1 + c^2*x^2] - 2*a^2*c^2*d*Log[d + e*x^2] - 4*b^2*c^2*d*ArcSin[Sqrt[(c^2*d)/(c^2*d -
 e)]]*ArcTan[c*x]*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*(Cos[2*ArcTan[c*x]] + I*Sin[2*ArcTan[c*x]]))/(c^2*d -
 e)] + 2*b^2*c^2*d*ArcTan[c*x]^2*Log[1 + ((c^2*d + e + 2*Sqrt[c^2*d*e])*(Cos[2*ArcTan[c*x]] + I*Sin[2*ArcTan[c
*x]]))/(c^2*d - e)] - (4*I)*b*c^2*d*(a + b*ArcTan[c*x])*PolyLog[2, -E^((2*I)*ArcTan[c*x])] + (2*I)*b*c^2*d*(a
+ b*ArcTan[c*x])*PolyLog[2, ((-(c^2*d) - e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e)] + (2*I)*a*b*
c^2*d*PolyLog[2, -(((c^2*d + e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e))] + (2*I)*b^2*c^2*d*ArcTa
n[c*x]*PolyLog[2, -(((c^2*d + e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e))] + 2*b^2*c^2*d*PolyLog[
3, -E^((2*I)*ArcTan[c*x])] - b^2*c^2*d*PolyLog[3, ((-(c^2*d) - e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^
2*d - e)] - b^2*c^2*d*PolyLog[3, -(((c^2*d + e + 2*Sqrt[c^2*d*e])*E^((2*I)*ArcTan[c*x]))/(c^2*d - e))])/(4*c^2
*e^2)

Maple [F]

\[\int \frac {x^{3} \left (a +b \arctan \left (c x \right )\right )^{2}}{e \,x^{2}+d}d x\]

[In]

int(x^3*(a+b*arctan(c*x))^2/(e*x^2+d),x)

[Out]

int(x^3*(a+b*arctan(c*x))^2/(e*x^2+d),x)

Fricas [F]

\[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x^{3}}{e x^{2} + d} \,d x } \]

[In]

integrate(x^3*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="fricas")

[Out]

integral((b^2*x^3*arctan(c*x)^2 + 2*a*b*x^3*arctan(c*x) + a^2*x^3)/(e*x^2 + d), x)

Sympy [F]

\[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int \frac {x^{3} \left (a + b \operatorname {atan}{\left (c x \right )}\right )^{2}}{d + e x^{2}}\, dx \]

[In]

integrate(x**3*(a+b*atan(c*x))**2/(e*x**2+d),x)

[Out]

Integral(x**3*(a + b*atan(c*x))**2/(d + e*x**2), x)

Maxima [F]

\[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x^{3}}{e x^{2} + d} \,d x } \]

[In]

integrate(x^3*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="maxima")

[Out]

1/2*a^2*(x^2/e - d*log(e*x^2 + d)/e^2) + integrate((b^2*x^3*arctan(c*x)^2 + 2*a*b*x^3*arctan(c*x))/(e*x^2 + d)
, x)

Giac [F]

\[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2} x^{3}}{e x^{2} + d} \,d x } \]

[In]

integrate(x^3*(a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="giac")

[Out]

sage0*x

Mupad [F(-1)]

Timed out. \[ \int \frac {x^3 (a+b \arctan (c x))^2}{d+e x^2} \, dx=\int \frac {x^3\,{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{e\,x^2+d} \,d x \]

[In]

int((x^3*(a + b*atan(c*x))^2)/(d + e*x^2),x)

[Out]

int((x^3*(a + b*atan(c*x))^2)/(d + e*x^2), x)